package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ResponseReportMapper;
import com.ruoyi.system.domain.ResponseReport;
import com.ruoyi.system.service.IResponseReportService;

/**
 * 一键上报Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-07-01
 */
@Service
public class ResponseReportServiceImpl implements IResponseReportService 
{
    @Autowired
    private ResponseReportMapper responseReportMapper;

    /**
     * 查询一键上报
     * 
     * @param rId 一键上报ID
     * @return 一键上报
     */
    @Override
    public ResponseReport selectResponseReportById(Long rId)
    {
        return responseReportMapper.selectResponseReportById(rId);
    }

    /**
     * 查询一键上报列表
     * 
     * @param responseReport 一键上报
     * @return 一键上报
     */
    @Override
    public List<ResponseReport> selectResponseReportList(ResponseReport responseReport)
    {
        return responseReportMapper.selectResponseReportList(responseReport);
    }

    /**
     * 新增一键上报
     * 
     * @param responseReport 一键上报
     * @return 结果
     */
    @Override
    public int insertResponseReport(ResponseReport responseReport)
    {
        responseReport.setCreateTime(DateUtils.getNowDate());
        return responseReportMapper.insertResponseReport(responseReport);
    }

    /**
     * 修改一键上报
     * 
     * @param responseReport 一键上报
     * @return 结果
     */
    @Override
    public int updateResponseReport(ResponseReport responseReport)
    {
        responseReport.setUpdateTime(DateUtils.getNowDate());
        return responseReportMapper.updateResponseReport(responseReport);
    }

    /**
     * 批量删除一键上报
     * 
     * @param rIds 需要删除的一键上报ID
     * @return 结果
     */
    @Override
    public int deleteResponseReportByIds(Long[] rIds)
    {
        return responseReportMapper.deleteResponseReportByIds(rIds);
    }

    /**
     * 删除一键上报信息
     * 
     * @param rId 一键上报ID
     * @return 结果
     */
    @Override
    public int deleteResponseReportById(Long rId)
    {
        return responseReportMapper.deleteResponseReportById(rId);
    }
}
